<?php
/**
 * 
 */
class ParamSirtBasis extends AppModel {
  
	var $name = 'ParamSirtBasis';
	var $displayField = 'id';
  
  // <editor-fold defaultstate="collapsed" desc="Validate array">
  var $validate = array(
    
    'alpha' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          'message' => 'Value must be between 0 and 2 exclusive.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'range' => array(
          'rule' => array('validateRange', // Custom func to do validation: uses app_model::validateRange() 
                          'alpha',  // field to validate
                           0,       // lower bound
                           2,       // upper bound
                           false, // lowerBoundIsOK  
                           false), // upperBoundIsOK  
          'message' => 'Value must be between 0 and 2 exclusive.',
        ),
        'numeric' => array(
          'rule' => array('numeric'),
          'message' => 'Value must be a real number between 0 and 2 exclusive.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
		),
		'niter' => array(
        'numeric' => array(
          'rule' => array('numeric'),
          'message' => 'Value must be an integer, 0 or greater.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'integerRange' => array(
            'rule' => array('validateIntRange', 'niter', 0, NULL),
            'message' => 'Value must be an integer, 0 or greater.'
        )
		),
		'nsubs' => array(
        'numeric' => array(
          'rule' => array('numeric'),
          'message' => 'Value must be an integer, 1 or greater.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
        'integerRange' => array(
            'rule' => array('validateIntRange', 'nsubs', 1, NULL),
            'message' => 'Value must be an integer, 1 or greater.'
        )
		),
    'sirt_type_id' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          'message' => 'This value cannot be empty.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
    ),
    'sirt_subset_mode_x_id' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          'message' => 'This value cannot be empty.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
    ),
    'sirt_subset_mode_y_id' => array(
        'notempty' => array(
          'rule' => array('notempty'),
          'message' => 'This value cannot be empty.',
          //'allowEmpty' => false,
          //'required' => false,
          //'last' => false, // Stop validation after this rule
          //'on' => 'create', // Limit validation to 'create' or 'update' operations
        ),
    )
  ); // </editor-fold>
  
  
  
  
  ///////////////////////////////////////////////////////////////////////////////////////////////////////
	//The Associations below have been created with all possible keys, those that are not needed can be removed

	var $hasOne = array(
		'ParamSirt' => array(
			'className' => 'ParamSirt',
			'foreignKey' => 'param_sirt_base_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'ParamSirtFavorite' => array(
			'className' => 'ParamSirtFavorite',
			'foreignKey' => 'param_sirt_base_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $belongsTo = array(
		'SirtType' => array(
			'className' => 'SirtType',
			'foreignKey' => 'sirt_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'SirtSubsetModeX' => array(
			'className' => 'SirtSubsetModeX',
			'foreignKey' => 'sirt_subset_mode_x_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'SirtSubsetModeY' => array(
			'className' => 'SirtSubsetModeY',
			'foreignKey' => 'sirt_subset_mode_y_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);
} //////////////// end class ////////////////////////////
